package server.conf;

import java.util.ArrayList;
import java.util.List;

/**
 * @author bwcx_jzy
 * @since 2021/11/19
 */
public class Mapper {

    private Integer port;

    private List<Host> hosts;

    public Integer getPort() {
        return port;
    }

    public void setPort(Integer port) {
        this.port = port;
    }

    public List<Host> getHosts() {
        return hosts;
    }

    public void setHosts(List<Host> hosts) {
        this.hosts = hosts;
    }

    public void addHost(Host host) {
        if (hosts == null) {
            hosts = new ArrayList<>();
        }
        hosts.add(host);
    }
}
